home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / dlasd6.z / dlasd6
Encoding:
Text File  |  2002-10-03  |  10.6 KB  |  265 lines

  1.  
  2.  
  3.  
  4. DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      DLASD6 - compute the SVD of an updated upper bidiagonal matrix B obtained
  10.      by merging two smaller ones by appending a row
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      SUBROUTINE DLASD6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA, IDXQ,
  14.                         PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM, POLES,
  15.                         DIFL, DIFR, Z, K, C, S, WORK, IWORK, INFO )
  16.  
  17.          INTEGER        GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL, NR, SQRE
  18.  
  19.          DOUBLE         PRECISION ALPHA, BETA, C, S
  20.  
  21.          INTEGER        GIVCOL( LDGCOL, * ), IDXQ( * ), IWORK( * ), PERM( * )
  22.  
  23.          DOUBLE         PRECISION D( * ), DIFL( * ), DIFR( * ), GIVNUM(
  24.                         LDGNUM, * ), POLES( LDGNUM, * ), VF( * ), VL( * ),
  25.                         WORK( * ), Z( * )
  26.  
  27. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  28.      These routines are part of the SCSL Scientific Library and can be loaded
  29.      using either the -lscs or the -lscs_mp option.  The -lscs_mp option
  30.      directs the linker to use the multi-processor version of the library.
  31.  
  32.      When linking to SCSL with -lscs or -lscs_mp, the default integer size is
  33.      4 bytes (32 bits). Another version of SCSL is available in which integers
  34.      are 8 bytes (64 bits).  This version allows the user access to larger
  35.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  36.      by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
  37.      only one of the two versions; 4-byte integer and 8-byte integer library
  38.      calls cannot be mixed.
  39.  
  40. PPPPUUUURRRRPPPPOOOOSSSSEEEE
  41.      DLASD6 computes the SVD of an updated upper bidiagonal matrix B obtained
  42.      by merging two smaller ones by appending a row. This routine is used only
  43.      for the problem which requires all singular values and optionally
  44.      singular vector matrices in factored form.  B is an N-by-M matrix with N
  45.      = NL + NR + 1 and M = N + SQRE.  A related subroutine, DLASD1, handles
  46.      the case in which all singular values and singular vectors of the
  47.      bidiagonal matrix are desired.
  48.  
  49.      DLASD6 computes the SVD as follows:
  50.  
  51.                    ( D1(in)  0    0     0 )
  52.        B = U(in) * (   Z1'   a   Z2'    b ) * VT(in)
  53.                    (   0     0   D2(in) 0 )
  54.  
  55.          = U(out) * ( D(out) 0) * VT(out)
  56.  
  57.      where Z' = (Z1' a Z2' b) = u' VT', and u is a vector of dimension M with
  58.      ALPHA and BETA in the NL+1 and NL+2 th entries and zeros elsewhere; and
  59.      the entry b is empty if SQRE = 0.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))
  71.  
  72.  
  73.  
  74.      The singular values of B can be computed using D1, D2, the first
  75.      components of all the right singular vectors of the lower block, and the
  76.      last components of all the right singular vectors of the upper block.
  77.      These components are stored and updated in VF and VL, respectively, in
  78.      DLASD6. Hence U and VT are not explicitly referenced.
  79.  
  80.      The singular values are stored in D. The algorithm consists of two
  81.      stages:
  82.  
  83.            The first stage consists of deflating the size of the problem
  84.            when there are multiple singular values or if there is a zero
  85.            in the Z vector. For each such occurence the dimension of the
  86.            secular equation problem is reduced by one. This stage is
  87.            performed by the routine DLASD7.
  88.  
  89.            The second stage consists of calculating the updated
  90.            singular values. This is done by finding the roots of the
  91.            secular equation via the routine DLASD4 (as called by DLASD8).
  92.            This routine also updates VF and VL and computes the distances
  93.            between the updated singular values and the old singular
  94.            values.
  95.  
  96.      DLASD6 is called from DLASDA.
  97.  
  98.  
  99. AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  100.      ICOMPQ (input) INTEGER Specifies whether singular vectors are to be
  101.      computed in factored form:
  102.      = 0: Compute singular values only.
  103.      = 1: Compute singular vectors in factored form as well.
  104.  
  105.      NL     (input) INTEGER
  106.             The row dimension of the upper block.  NL >= 1.
  107.  
  108.      NR     (input) INTEGER
  109.             The row dimension of the lower block.  NR >= 1.
  110.  
  111.      SQRE   (input) INTEGER
  112.             = 0: the lower block is an NR-by-NR square matrix.
  113.             = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
  114.  
  115.             The bidiagonal matrix has row dimension N = NL + NR + 1, and
  116.             column dimension M = N + SQRE.
  117.  
  118.      D      (input/output) DOUBLE PRECISION array, dimension ( NL+NR+1 ).
  119.             On entry D(1:NL,1:NL) contains the singular values of the
  120.             upper block, and D(NL+2:N) contains the singular values
  121.             of the lower block. On exit D(1:N) contains the singular values of
  122.             the modified matrix.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      VF     (input/output) DOUBLE PRECISION array, dimension ( M )
  141.             On entry, VF(1:NL+1) contains the first components of all
  142.             right singular vectors of the upper block; and VF(NL+2:M) contains
  143.             the first components of all right singular vectors of the lower
  144.             block. On exit, VF contains the first components of all right
  145.             singular vectors of the bidiagonal matrix.
  146.  
  147.      VL     (input/output) DOUBLE PRECISION array, dimension ( M )
  148.             On entry, VL(1:NL+1) contains the  last components of all
  149.             right singular vectors of the upper block; and VL(NL+2:M) contains
  150.             the last components of all right singular vectors of the lower
  151.             block. On exit, VL contains the last components of all right
  152.             singular vectors of the bidiagonal matrix.
  153.  
  154.      ALPHA  (input) DOUBLE PRECISION
  155.             Contains the diagonal element associated with the added row.
  156.  
  157.      BETA   (input) DOUBLE PRECISION
  158.             Contains the off-diagonal element associated with the added row.
  159.  
  160.      IDXQ   (output) INTEGER array, dimension ( N )
  161.             This contains the permutation which will reintegrate the
  162.             subproblem just solved back into sorted order, i.e.  D( IDXQ( I =
  163.             1, N ) ) will be in ascending order.
  164.  
  165.      PERM   (output) INTEGER array, dimension ( N )
  166.             The permutations (from deflation and sorting) to be applied to
  167.             each block. Not referenced if ICOMPQ = 0.
  168.  
  169.             GIVPTR (output) INTEGER The number of Givens rotations which took
  170.             place in this subproblem. Not referenced if ICOMPQ = 0.
  171.  
  172.             GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 ) Each pair
  173.             of numbers indicates a pair of columns to take place in a Givens
  174.             rotation. Not referenced if ICOMPQ = 0.
  175.  
  176.             LDGCOL (input) INTEGER leading dimension of GIVCOL, must be at
  177.             least N.
  178.  
  179.             GIVNUM (output) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
  180.             Each number indicates the C or S value to be used in the
  181.             corresponding Givens rotation. Not referenced if ICOMPQ = 0.
  182.  
  183.             LDGNUM (input) INTEGER The leading dimension of GIVNUM and POLES,
  184.             must be at least N.
  185.  
  186.      POLES  (output) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
  187.             On exit, POLES(1,*) is an array containing the new singular values
  188.             obtained from solving the secular equation, and POLES(2,*) is an
  189.             array containing the poles in the secular equation. Not referenced
  190.             if ICOMPQ = 0.
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))                                                          DDDDLLLLAAAASSSSDDDD6666((((3333SSSS))))
  203.  
  204.  
  205.  
  206.      DIFL   (output) DOUBLE PRECISION array, dimension ( N )
  207.             On exit, DIFL(I) is the distance between I-th updated (undeflated)
  208.             singular value and the I-th (undeflated) old singular value.
  209.  
  210.      DIFR   (output) DOUBLE PRECISION array,
  211.             dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and dimension ( N ) if
  212.             ICOMPQ = 0.  On exit, DIFR(I, 1) is the distance between I-th
  213.             updated (undeflated) singular value and the I+1-th (undeflated)
  214.             old singular value.
  215.  
  216.             If ICOMPQ = 1, DIFR(1:K,2) is an array containing the normalizing
  217.             factors for the right singular vector matrix.
  218.  
  219.             See DLASD8 for details on DIFL and DIFR.
  220.  
  221.      Z      (output) DOUBLE PRECISION array, dimension ( M )
  222.             The first elements of this array contain the components of the
  223.             deflation-adjusted updating row vector.
  224.  
  225.      K      (output) INTEGER
  226.             Contains the dimension of the non-deflated matrix, This is the
  227.             order of the related secular equation. 1 <= K <=N.
  228.  
  229.      C      (output) DOUBLE PRECISION
  230.             C contains garbage if SQRE =0 and the C-value of a Givens rotation
  231.             related to the right null space if SQRE = 1.
  232.  
  233.      S      (output) DOUBLE PRECISION
  234.             S contains garbage if SQRE =0 and the S-value of a Givens rotation
  235.             related to the right null space if SQRE = 1.
  236.  
  237.      WORK   (workspace) DOUBLE PRECISION array, dimension ( 4 * M )
  238.  
  239.      IWORK  (workspace) INTEGER array, dimension ( 3 * N )
  240.  
  241.      INFO   (output) INTEGER
  242.             = 0:  successful exit.
  243.             < 0:  if INFO = -i, the i-th argument had an illegal value.
  244.             > 0:  if INFO = 1, an singular value did not converge
  245.  
  246. FFFFUUUURRRRTTTTHHHHEEEERRRR DDDDEEEETTTTAAAAIIIILLLLSSSS
  247.      Based on contributions by
  248.         Ming Gu and Huan Ren, Computer Science Division, University of
  249.         California at Berkeley, USA
  250.  
  251.  
  252. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  253.      INTRO_LAPACK(3S), INTRO_SCSL(3S)
  254.  
  255.      This man page is available only online.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.